package com.gz.furnitures.utils;

import javax.servlet.http.HttpServletRequest;
import java.text.SimpleDateFormat;
import java.util.Date;

public class WebUtils {
    //判断是否是ajax请求
    public static boolean isAjaxRequest(HttpServletRequest request) {
        return "XMLHttpRequest".equals(request.getHeader("X-Requested-With"));
    }

    public static String FURN_IMG_DIRECTORY="assets/images/product-image";

    public  static String getYearMonthDay(){
        String date=new SimpleDateFormat("yyyy/MM/dd").format(new Date());
        return date;
    }
}
